import request from "../utils/request";

//推荐歌单
//personalized
export const getRecommendList = () => {
  return request({
    method: "GET",
    url: "personalized?limit=15",
  });
};

// 新歌首发
//personalized/newsong?limit=40
export const getNewStartList = () => {
  return request({
    method: "GET",
    url: "personalized/newsong?limit=45",
  });
};

//新碟首发 /album/new
/*
`limit` : 返回数量 , 默认为 30
`area` : ALL:全部,ZH:华语,EA:欧美,KR:韩国,JP:日本
 */
export const getNewAlbumList = area => {
  return request({
    method: "GET",
    url: "album/new",
    params: {
      limit: 20,
      area,
    },
  });
};

//排行榜 /playlist/detail?id:
export const getTopList = id => {
  return request({
    method: "GET",
    url: `playlist/detail?id=${id}`,
  });
};
//MV /top/mv?area=港台
/*
limit:数量，默认为30
area：地区，可选值为内地,港台,欧美,日本,韩国,不填则为全部
*/
export const getMVList = area => {
  return request({
    method: "GET",
    url: "top/mv",
    params: {
      limit: 20,
      area,
    },
  });
};
